﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="LinkList.aspx.cs" Inherits="webadmin_LinkList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <link type="text/css" href="css/style.css" rel="stylesheet" />
    <script type="text/javascript" src="../js/jquery.js"></script>
    <script type="text/javascript" src="js/lib.js"></script>
    <script type="text/javascript">
    $(function(){
        BindBtn();
        AddTrClass($("#listinfo"));
    })
    function ShowDialog(type,id){
        var url = "", title;
        var infotype=<%=nType %>;
        title="<%=GetName(nType) %>";
        switch(type)
        {
            case 1:
                title="编辑"+title;
                url="DoLink.aspx?type=edit&infotype="+infotype+"&id="+id;
                break;
            case 2:
                title="新增"+title;
                url="DoLink.aspx?type=add&infotype="+infotype;
                break;
        }
        top.CreateIframe(title,url,400,200);
    }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="conBox">
        <div class="grid-box" style="padding-top: 10px">
            <table class="form-table">
                <thead>
                    <tr>
                        <td colspan="3">
                            查询选项
                        </td>
                    </tr>
                </thead>
                <tbody>
                    <tr class="tr1">
                        <td class="oneTd">
                            <div>
                                <span style="color: #4b4646;">分类选择：<asp:DropDownList ID="ddlSort" runat="server"
                                    AutoPostBack="True" OnSelectedIndexChanged="ddlSort_SelectedIndexChanged">
                                    <asp:ListItem Value="1" Text="医疗机构"></asp:ListItem>
                                    <asp:ListItem Value="3" Text="友情链接"></asp:ListItem>
                                </asp:DropDownList>
                                </span>
                            </div>
                        </td>
                    </tr>
                </tbody>
            </table>
            <div class="ctrlbar">
                <div class="f-left">
                </div>
                <div class="f-right">
                    <a href="javascript:void(0);" id="btnDel" class="toolbtn" style="display: none;">
                        <img src="images/ico-delete.gif" alt="删除" />删 除</a> <a href="javascript:ShowDialog(2,0)"
                            class="toolbtn">
                            <img src="images/ico-add.gif" alt="新增" />新 增</a>
                </div>
                <div class="clear">
                </div>
            </div>
            <div class="grid-box">
                <table class="grid-table">
                    <thead>
                        <tr>
                            <th class="align-l" style="width: 1px; padding: 0;">
                            </th>
                            <td style="<%=CheckDisplay()%>">
                                图标
                            </td>
                            <td>
                                名称
                            </td>
                            <td>
                                链接地址
                            </td>
                              <td class="align-c">
                                上移</td>
                            <td class="align-c">
                                下移</td>
                            <td class="align-c">
                                编辑
                            </td>
                            <td class="align-c">
                                删除
                            </td>
                        </tr>
                    </thead>
                    <tbody id="listinfo">
                        <asp:Repeater ID="rptLink" runat="server" OnItemDataBound="rptSort_ItemDataBound" OnItemCommand="rptLink_ItemCommand">
                            <ItemTemplate>
                                <tr>
                                    <td>
                                    </td>
                                    <td style="<%#CheckDisplay()%>">
                                        <asp:Image ID="imgLogo" runat="server" ImageUrl='<%#"/"+WebConfigInfo.FilePlace+"d/"+Eval("ImgPlace")%>'
                                            Width="54" Height="54" />
                                    </td>
                                    <td>
                                        <%#Eval("Name")%>
                                    </td>
                                    <td>
                                        <%#Eval("Url")%>
                                    </td>
                                    <td class='align-c'>
                                        <asp:ImageButton ID="btnUp" CommandName="OrderUp" ImageUrl="images/up.gif" runat="server"
                                            ToolTip="上移" />
                                    </td>
                                    <td class='align-c'>
                                        <asp:ImageButton ID="btnDown" CommandName="OrderDown" ImageUrl="images/down.gif"
                                            runat="server" ToolTip="下移" />
                                    </td>
                                    <td class='align-c'>
                                        <a href="javascript:ShowDialog(1,<%#Eval("ID")%>)">
                                            <img alt="编辑" src="images/ico-edit.gif" /></a>
                                    </td>
                                    <td class='align-c'>
                                        <asp:ImageButton ID="btnDelete" runat="server" CommandName="Delete" CommandArgument='<%#Eval("ID")+","+Eval("ImgPlace")%>'
                                            ImageUrl="images/ico-delete.gif" OnClientClick="return confirm('确定要删除该信息吗?');"
                                            ToolTip="删除" />
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </tbody>
                </table>
                <div id="noData" runat="server">
                    <div class="noDateMsg">
                        没有任何信息！</div>
                </div>
            </div>
        </div>
    </div>
    <asp:Button ID="btnReset" runat="server" Text="Button" OnClick="btnReset_Click" Style="display: none;" />
    </form>
</body>
</html>
